package com.qipay.ips.service;

import com.qipay.baas.model.WhiteIps;
import com.qipay.security.UserDetailsServiceImpl;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface IpsService {
    /**
     * 添加一个ip
     */
    public void add(UserDetailsServiceImpl.LoginUserDetails loginUser, String ipAddress);

    /**
     * 删除一个ip
     */
    public void delete(UserDetailsServiceImpl.LoginUserDetails loginUser, long id);

    /**
     * 批量删除ip
     */
    public void deleteSome();

    /**
     * 查询当前登录商户所有白名单ip
     */
    public List<WhiteIps> query(UserDetailsServiceImpl.LoginUserDetails loginUser);

    /**
     * 检查是否是ip白名单
     */
    public boolean checkIp(String userName,HttpServletRequest request);

    /**
     * 是否没有白名单
     */
    public boolean isNotWhiteIp(String userName);

}
